﻿using System;
using System.IO;
using System.Text.RegularExpressions;

namespace DeleteWord
{
    class DeleteWord
    {
        static void Main()
        {
            string line;
            using (StreamWriter writer = new StreamWriter("..\\..\\Result.txt"))
            {
                using (StreamReader reader = new StreamReader("..\\..\\File.txt"))
                {
                    while ((line = reader.ReadLine()) != null)
                    {
                        writer.WriteLine(Regex.Replace(line, @"\btest\w{1,}", ""));
                    }
                }
            }
        }
    }
}
